
import { useEffect } from 'react'
import { useTranslation } from 'react-i18next'
import { useAliveController } from 'react-activation'
import Header from '@/components/Header'
import './index.less'

const Home = () => {

  const { t } = useTranslation(['allInOne'])

  const { drop } = useAliveController()

  useEffect(() => {
    drop('components-communication')
    drop('bug-manager-home')
  }, [])

  const appList: AppListType = [
    {
      name: t('app.bilibili'),
      path: '/aio/bilibili'
    },
    {
      name: t('app.bugManager'),
      path: '/aio/bug-manager'
    },
    {
      name: t('app.webGames'),
      path: '/aio/web-games'
    },
    {
      name: t('app.moduleTest'),
      path: '/aio/module-test'
    },
  ]

  return <div className='aio-home'>
    <Header appList={appList} />
  </div>
}

export default Home
